<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    // let name = `jack`
    // console.log(name)
    // const htmlStr = `<div class="hot-goods-box"> <h1>热⻔商品</h1> <p>卖爆了卖爆了卖爆了</p> </div>`
    // console.log(htmlStr)

    const obj = {
        name: 'vue3',
        age: 9
    }
    console.log(obj.name)
    console.log(obj['age'])

    let min = 1
    let max = 100
    const obj1 = {
        min,
        max
    }
    console.log(min)
    console.log(max)

    const arr = [1, 2, 3]
    let [a, b, c] = arr
    console.log(a, b, c)

    let [d, , e] = arr
    console.log(d, e)
    let [f, ...end] = arr
    console.log(f, end)

    const obj2 = {
        name: 'zhangsan',
        age: 18,
        address: '花园'
    }

    const {name: n, age: age, address: addre} = obj2
    console.log(n, age, addre)

    const arr2 = [1, [3, 4], 2]
    const [g, h] = arr2[1]
    console.log(g, h)

    const obj3 = {
        data: {
            code: 10000,
            message: '频道列表获取成功',
            result: ['HTML', 'CSS', 'JavaScript', 'Vue', 'SprintBoot']
        },
        status: 200,
        statusText: 'Ok'
    }

    // 先解析
    const { data : data1} = obj3
    console.log(data1)
    // 再次解析
    const { code, message, result : list } = data1
    console.log(code, message, list)

</script>
</body>
</html>